package com.yycx.module.push.provider.factory;

import com.yycx.common.base.client.BasePushClient;
import com.yycx.common.base.service.BasePushService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


/**
 * 推送工厂类
 * @param <K>
 */
@Component
public class PushFactory<K> {

    @Autowired(required = false)
    private BasePushClient<K> basePushClient;

    /**
     * 获取推送实例
     * @param key
     * @return
     */
    public BasePushService createBasePush(String key) {
        return basePushClient.getMap().get(key);
    }
}
